<div class="data-view compile" ng-controller="CompileUserCtrl" id="new_user">
	<header class="bar bar-header" ng-show="cancle_but">
		<div class="buttons" >
	    	<button class="button" ng-click="closeTheCurrent()">关闭</button>
	  	</div>
	   <h1 class="title">{{REAL_NAME?REAL_NAME:'新增客户'}}</h1>
	   <div class="buttons" >
	    	<button class="button" ng-click="SubmitFun(SelectdCollection)">保存</button>
	  	</div>
	</header>
	<div class="img-none" ng-show="!cancle_but">
		<img src="img/logo.png"/>
		<span>您还未选择客户</span>
	</div>
	<div ng-show="cancle_but">
   		<div class="new-tabs">
			<ul>
				<li ng-repeat="tab in tabs" 
					ng-class="{active:isActiveTab(tab.url)}" 
					ng-click="onClickTab(tab)">{{tab.title}}</li>
			</ul>
			<div id="mainView" ng-repeat="identity in information">
				<div ng-include="currentTab"></div>
			</div>
		</div>
		<div class="tab_content">
			<script type="text/ng-template" id="1">
				<ion-content class="has-header">
					<div class="basic_information">
						<h4>身份信息</h4>
						<div class="form">
							<input type="hidden" ng-model="SelectdCollection.ID" />
							<input id="name_input" placeholder="请输入客户姓名" ng-model="SelectdCollection.REAL_NAME" type="text" ng-blur="inputVerification(0,SelectdCollection.REAL_NAME,'name_input')"/>
							<label class="item-radio" ng-repeat="r in identity.Sex">
								<input type="radio" value="{{r}}" ng-click="sexerror()" ng-model="SelectdCollection.SEX" {{SEX == r?'checked':''}} >
								<div class="item-content">
									{{r == 1?"女":"男"}}
								</div>
								
								<p class="remark" style="line-height: 37px; color:#D13F14;display:none" id="sex_error" >
									请选择性别
								</p>
							</label>
						</div>
						<div class="form">
							<div>
								<select ng-model="SelectdCollection.TYPE" ng-options="type for type in identity.ClientType" >  
									<option style="width:50px;" value="">  {{TYPE == "01"?"客户":TYPE == "02"?"准客户":"请选择客户类型"}}</option>
								</select>
							</div>
							<span class="unit select_arrow"></span>
						</div>
						<div class="form">
							<div>
								<select ng-model="SelectdCollection.SOURCE" ng-options="source for source in identity.ClientSource">  
									<option value="">{{SOURCE?SOURCE:'请选择客户来源'}}</option>
								</select>
							</div>
							<span class="unit select_arrow"></span>
						</div>
						<div class="form">
							<div class="SelectList">
								<select ng-model="SelectdCollection.NATIONALITY" ng-options="nation for nation in identity.ClientNation">  
									<option value="">{{NATIONALITY?NATIONALITY:'民族'}}</option>
								</select>
								<span class="unit select_arrow"></span>
							</div>
							<div class="SelectList">
								<select ng-model="SelectdCollection.MARRI_STATUS" ng-options="e for e in identity.MARRI_STATUS">  
									<option value="">{{MARRI_STATUS? MARRI_STATUS:'婚姻状况'}}</option>
								</select>
								<span class="unit select_arrow"></span>
							</div>
							<div class="SelectList">
								<select ng-model="SelectdCollection.EDUCATION" ng-options="e for e in identity.EducationBackground">
									<option value="">{{EDUCATION? EDUCATION:'学历'}}</option>
								</select>
								<span class="unit select_arrow"></span>
							</div>
						</div>
						<div class="form">
							<div class="SelectList">
								<select ng-model="SelectdCollection.NATIVE_PLACE" ng-options="country for country in identity.Nationality">  
									<option value="">{{NATIVE_PLACE?NATIVE_PLACE:'国籍'}}</option>
								</select>
								<span class="unit select_arrow"></span>
							</div>
						</div>
						<div class="form">
							
							<div class="SelectList">
								<select ng-model="SelectdCollection.RGT_PROVINCE" ng-options="p for p in identity.Province">  
									<option value="">{{RGT_PROVINCE?RGT_PROVINCE:'户籍省'}}</option>
								</select>
								<span class="unit select_arrow"></span>
							</div>
							<div class="SelectList">
								<select ng-model="SelectdCollection.RGT_CITY" ng-options="c for c in identity.City" ng-change="selectAction(SelectdCollection)">  
									<option value="">户籍市</option>
								</select>
								<span class="unit select_arrow"></span>
							</div>
							<div class="SelectList">
								<select ng-model="SelectdCollection.HOUSEHOLD_COUNTY" ng-options="c for c in identity.County">  
									<option value="">户籍区/县</option>
								</select>
								<span class="unit select_arrow"></span>
							</div>
						</div>
						<div class="form IdNumber">
							<input id="clear_address" ng-model="SelectdCollection.HOUSEHOLD_ADRESS" class="phone-input" placeholder="请输入详细户籍地址" type="text" ng-blur="IdNumber()"/>
						</div>
						<div class="form">
							<div class="SelectList">
								<select ng-model="SelectdCollection.IDTYPE" ng-options="certificate for certificate in identity.CertificateType">  
									<option value="">{{IDTYPE?IDTYPE:'证件类型'}}</option>
								</select>
								<span class="unit select_arrow"></span>
							</div>
						</div>
						<div class="form IdNumber">
							<input id="clear_identify" class="phone-input IDNO" placeholder="{{IDNO?IDNO:'请输入证件号码'}}" ng-model="SelectdCollection.IDNO" type="text" ng-blur="inputVerification(1,SelectdCollection.IDNO,'clear_identify')" />
							<p class="remark" style="line-height: 37px; color:#D13F14;display:none" id="clear_identify_error" >
								请输入正确的证件号
							</p>
						</div>
						<div class="form">
							<p class="clickDate birthoayDate" ng-click="birthoayDate()">{{BIRTHDAY?BIRTHDAY:'出生日期'}}</p>
							<span>{{c_age?c_age+'岁':'年龄'}}</span>
						</div>
						<div class="form">
							<p class="clickDate validityDate" ng-click="validityDate()">{{ID_END_DATE?ID_END_DATE:'身份证有效期'}}</p>
							<span ng-click="longTerm()" ng-class="{'longTerm':1 == ClassName}">长期有效</span>
						</div>
					</div>
					<div class="basic_information">
						<h4>收入信息</h4>
						<div class="form">
							<input id="accout_clear" placeholder="年收入" ng-model="SelectdCollection.INCOME" type="text" ng-blur="inputVerification(8,SelectdCollection.INCOME,'accout_clear')" />
							
							<p class="remark" style="line-height: 37px; color:#D13F14;display:none" id="accout_clear_error" >
								请输入数字
							</p>
							<span class="unit">万元</span>
						</div>
						
						<div class="form income">
							<label class="item-radio" ng-repeat="ct in identity.companyType">
								<input type="radio" value="{{ct}}" ng-model="SelectdCollection.companyType" >
								<div class="item-content">
									{{ct}}
								</div>
							</label>
						</div>
						<div class="form">
							<input id="clear_come" placeholder="请输入其他收入来源" ng-model="SelectdCollection.OTHER_INCOME_WAY" type="text"/>
						</div>						
						<div class="form" ng-click="login()">
							<input placeholder="请选择客户职业" type="text" disabled="disabled" id="input_proname"/>
							<input type="hidden" id="input_procode"/>
							<span class="unit work_search"></span>
						</div>
						<div class="form">
							<input id="clear_work" placeholder="请输入现工作单位" ng-model="SelectdCollection.WORK_UNIT" type="text"/>
						</div>	
					</div>
					<div class="basic_information">
						<h4>其他信息</h4>
						<div class="form form-input">
							<input id="clear_height" class="SelectList" placeholder="身高" ng-model="SelectdCollection.HEIGHT" type="text" ng-blur="inputVerification(8,SelectdCollection.HEIGHT,'clear_height')"/>
							<span class="unit danwei">CM</span>
							<p class="remark" style="line-height: 37px; color:#D13F14;display:none" id="clear_height_error" >
								请输入数字
							</p>
						</div>
						<div class="form form-input"> 
							<input id="weight_clear" class="SelectList" placeholder="体重" ng-model="SelectdCollection.WEIGHT" type="text" ng-blur="inputVerification(8,SelectdCollection.WEIGHT,'weight_clear')"/>
							<span class="unit danwei">KG</span>
							<p class="remark" style="line-height: 37px; color:#D13F14;display:none" id="weight_clear_error" >
								请输入数字
							</p>
						</div>
						<div style="clear:both"></div>
						<div class="form">
							<input id="habit_clear" placeholder="请输入客户爱好" ng-model="SelectdCollection.HOBBY" type="text"/>
						</div>
						<div class="form">
							<p class="clickDate specialDay" ng-click="specialDay()">{{ANNIVERSARY?ANNIVERSARY:'客户特殊纪念日'}}</p>
						</div>
					</div>
					<div class="basic_information">
						<h4>客户标签</h4>
						<div class="form income label_client">
							<label class="item-radio" ng-repeat="label in labels">
								<input type="radio" value="{{label.MARK_NAME}}" ng-model="SelectdCollection.MARK_NAME" >
								<div class="item-content">
									{{label.MARK_NAME}}
								</div>
							</label>
						</div>
					</div>
					<div class="basic_information">
						<h4>客户倾向选择</h4>
						<div class="form">
							<div>
								<select ng-model="SelectdCollection.ACCOUNT_TENDENCY" ng-options="e for e in identity.ACCOUNT_TENDENCY">  
									<option value="">{{ACCOUNT_TENDENCY? ACCOUNT_TENDENCY:'请选择客户倾向选择账户'}}</option>
								</select>		
							</div>
							<span class="unit select_arrow"></span>
						</div>
					</div>
				</ion-content>
			</script>
			<script type="text/ng-template" id="2">
				<ion-content class="has-header">
					<div class="customer_address">
						<h4>现家庭住址</h4>
						<div class="form">
							<div class="SelectList">
								<select ng-model="SelectdCollection.HOME_PROVINCE" ng-options="p for p in identity.Province">  
									<option value="">{{HOME_PROVINCE?HOME_PROVINCE:'省'}}</option>
								</select>
							</div>
							<div class="SelectList">
								<select ng-model="SelectdCollection.HOME_CITY" ng-options="c for c in identity.City"> 
									<option value="">{{HOME_CITY?HOME_CITY:'市'}}</option>
								</select>
							</div>
							<div class="SelectList">
								<select ng-model="SelectdCollection.HOME_COUNTY" ng-options="q for q in identity.County">  
									<option value="">{{HOME_COUNTY?HOME_COUNTY:'区(县)'}}</option>
								</select>
							</div>
						</div>
						<div class="form">
							<input class="phone-input" placeholder="{{HOME_ADDRESS?HOME_ADDRESS:'请输入详细家庭住址'}}" ng-model="SelectdCollection.HOME_ADDRESS" type="text"/>
						</div>
						<div class="form">
							<input class="SelectList phone-input" id="HOME_ZIP_CODE" placeholder="{{HOME_ZIP_CODE?HOME_ZIP_CODE:'家庭邮编'}}" ng-model="SelectdCollection.HOME_ZIP_CODE" type="text" ng-blur="inputVerification(2,SelectdCollection.HOME_ZIP_CODE,'HOME_ZIP_CODE')"/>
							<p class="remark" style="line-height: 37px; color:#D13F14;display:none" id="HOME_ZIP_CODE_error" >
								请输入正确的邮政编码
							</p>
						</div>
					</div>
					<div class="customer_address">
						<h4>单位住址</h4>
						<div class="form">
							<div class="SelectList">
								<select ng-model="SelectdCollection.COMPANY_PROVINCE" ng-options="p for p in identity.Province">  
									<option value="">{{COMPANY_PROVINCE?COMPANY_PROVINCE:'省'}}</option>
								</select>
							</div>
							<div class="SelectList">
								<select ng-model="SelectdCollection.COMPANY_CITY" ng-options="c for c in identity.City"> 
									<option value="">{{COMPANY_CITY?COMPANY_CITY:'市'}}</option>
								</select>
							</div>
							<div class="SelectList">
								<select ng-model="SelectdCollection.COMPANY_COUNTY" ng-options="q for q in identity.County">  
									<option value="">{{COMPANY_COUNTY?COMPANY_COUNTY:'区(县)'}}</option>
								</select>
							</div>
						</div>
						<div class="form">
							<input class="phone-input" placeholder="{{COMPANY_ADDRESS?COMPANY_ADDRESS:'请输入详细单位住址'}}" ng-model="SelectdCollection.COMPANY_ADDRESS" type="text"/>
						</div>
						<div class="form">
							<input class="SelectList phone-input" id="COMPANY_ZIP_CODE" placeholder="{{COMPANY_ZIP_CODE?COMPANY_ZIP_CODE:'单位邮编'}}" ng-model="SelectdCollection.COMPANY_ZIP_CODE" type="text" ng-blur="inputVerification(2,SelectdCollection.COMPANY_ZIP_CODE,'COMPANY_ZIP_CODE')"/>
							<p class="remark" style="line-height: 37px; color:#D13F14;display:none" id="COMPANY_ZIP_CODE_error" >
								请输入正确的邮政编码
							</p>
						</div>
					</div>
					<div class="customer_address">
						<h4>通讯地址</h4>
						<div class="form">
							<input class="phone-input" id="HOME_PHONE" placeholder="{{HOME_PHONE?HOME_PHONE:'请输入家庭电话'}}" ng-model="SelectdCollection.HOME_PHONE" type="text" ng-blur="inputVerification(4,SelectdCollection.HOME_PHONE,'HOME_PHONE')"/>
							<p class="remark" id="HOME_PHONE_error">
								请按格式输入000-00000000
								如无请填000-00000000
							</p>
						</div>
						<div class="form">
							<input class="phone-input" id="COMPANY_PHONE" placeholder="{{COMPANY_PHONE?COMPANY_PHONE:'请输入单位电话'}}" ng-model="SelectdCollection.COMPANY_PHONE" type="text" ng-blur="inputVerification(4,SelectdCollection.COMPANY_PHONE,'COMPANY_PHONE')"/>
							<p class="remark" id="COMPANY_PHONE_error">
								请按格式输入000-00000000
								如无请填000-00000000
							</p>
						</div>
						<div class="form">
							<input class="phone-input" id="MOBILE" placeholder="{{MOBILE?MOBILE:'移动电话'}}" ng-model="SelectdCollection.MOBILE" type="text"  ng-blur="inputVerification(3,SelectdCollection.MOBILE,'MOBILE')"/>
							<p class="remark" style="line-height: 37px;" id="MOBILE_error">
								请填入11位手机号码
							</p>
						</div>
						<div class="form income">
							<p class="address">邮寄地址选择</p>
							<label class="item-radio" ng-repeat="site in identity.sites">
								<input type="radio" value="{{site}}" ng-model="SelectdCollection.MAILING_ADDRESS" >
								<div class="item-content">
									{{site}}
								</div>
							</label>
						</div>
					</div>
					<div class="customer_address">
						<h4>其他</h4>
						<div class="rest">
							<p>新浪微博 <span>1098787643</span></p>
						</div>
						<div class="form">
							<div class="SelectList">
								<select ng-model="SelectdCollection.NATIVE_PLACE" ng-options="country for country in identity.Number">  
									<option value="">{{Number?Number:'邮箱'}}</option>
								</select>
							</div>
							<input type="text" placeholder="1870987@126.com ">
						</div>
					</div>
					<div class="customer_address">
						<h4>备注</h4>
						<div class="form" style="height: 135px;">
							<textarea ng-model="SelectdCollection.REMARKS"></textarea>
						</div>
					</div>
				</ion-content>
			</script>
			<script type="text/ng-template" id="3">
				<ion-content class="has-header">
					<div id="family_info" >
						<div class="user_info" ng-show="!F_info">
						  <h4 class="del-families">
						    {{RELATION}}
						    <span class="delete_node"></span>
						    <span></span>
						  </h4>
						  <p>
						    <span>姓名:</span>
						    {{F_REAL_NAME}}
						  </p>
						  <p>
						    <span>性别:</span>
						    {{F_SEX == 1?"女":"男"}}
						  </p>
						  <p>
						    <span>出生日期:</span>
						    {{F_BIRTHDAY}}
						  </p>
						  <p>
						    <span>年龄:</span>
						    {{age}}
						  </p>
						</div>
					</div>
			   		<input type="button" value="点击添加关系信息" ng-click="AddFamiliesFun()" ng-show="!AddFamilies" />
			  		<div class="customer_address" ng-show="AddFamilies">
						<h4>添加家属信息</h4>
						<div class="form">
							<div>
								<select class="phone-select" ng-model="SelectdCollection.RELATION" ng-options="r for r in identity.Relationship">  
									<option value="">与本人关系</option>
								</select>
							</div>
							<label class="item-radio" ng-repeat="s in identity.Sex">
								<input type="radio" value="{{s}}" ng-model="SelectdCollection.F_SEX">
								<div class="item-content">
									{{s == 1?"女":"男"}}
								</div>
							</label>
						</div>
						<div class="form">
							<input class="phone-input" placeholder="请输入姓名" ng-model="SelectdCollection.FamiliesName" type="text"/>
						</div>
						<div class="form FamiliesDate">
							<p class="clickDate" ng-click="FamiliesDate()">出生日期</p>
							<span>年龄</span>
						</div>
					</div>			   		
				</ion-content>
				<div class="fun_btn bar bar-footer" ng-show="AddFamilies">
					<input type="button" value="取消" ng-click="CancelAddFun()"/>
					<input type="button" value="确定" ng-click="SaveFamiliesFun(SelectdCollection)"/>
				</div>
			</script>
		</div>
	</div>
</div>